function AppSettingAssistant(argFromPusher) {
	if (argFromPusher) 
		this.showAlert = argFromPusher.showAlert;
}

AppSettingAssistant.prototype = {
	setup: function() {
		Ares.setupSceneAssistant(this);
		this.$.toggleButton1.setValue(offline)
		this.$.textField1.setValue(serverUrl);
		if(this.showAlert)
			myAlert(this, "Cannot connect to server. Please check your settings.");
	},
	cleanup: function() {
		Ares.cleanupSceneAssistant(this);
	},
	button1Tap: function(inSender, event) {
		offline = this.$.toggleButton1.getValue();
		serverUrl = this.$.textField1.getValue();
		localStorage.setItem("serverUrl", serverUrl);
		connectToServer();
	},
	button2Tap: function(inSender, event) {
		if( localStorage.getItem("sessid") == null) 
			myAlert("Please click \"Save\" first.");
		loadProducts(true, this);
		loadMenu(true, this);
	},
	button3Tap: function(inSender, event) {
		clearCache();
	}
};